﻿$(window).resize(loginBox);
$(function () {
	loginBox();
    $('.rem').click(function () {
        $(this).toggleClass('selected');
    })
})



//定位登录框
function loginBox()
{
	var box=$(".signup_container")
	var boxheigth=box.height();
	var boxwidth=box.width();
	var height	=	$(window).height();
	var width	=	$(window).width();
	
	var top=0;
	var left=0;
	
	if(boxheigth<height)
	{
		top=(height-boxheigth)/2;
	}

	if(boxwidth<width)
	{
		left=(width-boxwidth)/2;
	}
	box.css({"top":top,"left":left});
	
}